package com.mtsmda.bookjava7.chapter2.castingEx;

import java.awt.Color;

public class Animal implements Eatable{
	
	public void animal(){
		System.out.println("Animal.animal()");
	}
	
	@Override
	public void eat() {
		System.out.println("all");
	}
	
	public Animal getAnimal(){
		return new Animal();
	}
	
	public Eatable getDog(){
		return new Dog();
	}
	
}

class SubObject extends Object{
	public SubObject() {
		new Color(255, 255, 255);
	}
}